<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<title>Reports</title>
</head>
<body>
<c:if test="${sessionScope.sessionUsrTyp == 'ADM'}">
<h1>Attendees</h1>
</c:if>
<c:if test="${sessionScope.sessionUsrTyp == 'USR'}">
<h1>My Trainings</h1>
</c:if>

<c:if test="${!empty attendees}">

	<table>
		<tr>
			<th>Training Status</th>
			<th>Training ID</th>
			<th>Training Topic</th>
			<th>User ID</th>
			<th>Lastname</th>
			<th>Status</th>
		
		</tr>

		<c:forEach items="${attendees}" var="attendees">
			<tr>
				<td><c:out value="${attendees.status}"/></td>
				<td><c:out value="${attendees.trainingId}"/></td>
				<td><c:out value="${attendees.topic}"/></td>
				<td><c:out value="${attendees.userId}"/></td>
				<td><c:out value="${attendees.lastName}"/></td>
				<td><c:out value="${attendees.paymentStatus}"/></td>
				<td><c:if test="${attendees.status == 'Active'}">
					<a href="#">CANCEL</a>
				</c:if>	
				</td>
			</tr>

		</c:forEach>
	</table>
</c:if>
</body>
</html>